package com.ys.entity.hr;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Table;
import com.alibaba.fastjson.annotation.JSONField;
import com.ys.annotation.YsField;
import com.ys.entity.base.BaseEntity;
/**
*/
@Table(name="TWL_Stock", catalog="Id")
public class TwlStock extends BaseEntity<TwlStock> {

	@YsField(nameDataBase="Id", nameJava="id", typeDataBase="bigint")
	private Long id;
	@YsField(nameDataBase="CompanyVid", nameJava="companyVid", typeDataBase="varchar")
	private String companyVid;
	@YsField(nameDataBase="Orgid", nameJava="orgid", typeDataBase="varchar")
	private String orgid;
	@YsField(nameDataBase="MaterialCode", nameJava="materialCode", typeDataBase="varchar")
	private String materialCode;
	@YsField(nameDataBase="Num", nameJava="num", typeDataBase="int")
	private Integer num;
	@YsField(nameDataBase="NumAll", nameJava="numAll", typeDataBase="int")
	private Integer numAll;
	@YsField(nameDataBase="NumFrozen", nameJava="numFrozen", typeDataBase="int")
	private Integer numFrozen;
	@YsField(nameDataBase="Price", nameJava="price", typeDataBase="decimal")
	private BigDecimal price;
	@YsField(nameDataBase="StockInDetailId", nameJava="stockInDetailId", typeDataBase="bigint")
	private Long stockInDetailId;
	@YsField(nameDataBase="StockInDay", nameJava="stockInDay", typeDataBase="char")
	private String stockInDay;
	@YsField(nameDataBase="Remark", nameJava="remark", typeDataBase="varchar")
	private String remark;
	@YsField(nameDataBase="Status", nameJava="status", typeDataBase="tinyint")
	private Integer status;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="CreateTime", nameJava="createTime", typeDataBase="datetime")
	private Date createTime;
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@YsField(nameDataBase="UpdateTime", nameJava="updateTime", typeDataBase="datetime")
	private Date updateTime;

	public Long getId() {
		return id;
	}
	public TwlStock setId(Long id) {
		this.id = id;
		return this;
	}
	public String getCompanyVid() {
		return companyVid;
	}
	public TwlStock setCompanyVid(String companyVid) {
		this.companyVid = companyVid;
		return this;
	}
	public String getOrgid() {
		return orgid;
	}
	public TwlStock setOrgid(String orgid) {
		this.orgid = orgid;
		return this;
	}
	public String getMaterialCode() {
		return materialCode;
	}
	public TwlStock setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
		return this;
	}
	public Integer getNum() {
		return num;
	}
	public TwlStock setNum(Integer num) {
		this.num = num;
		return this;
	}
	public Integer getNumAll() {
		return numAll;
	}
	public TwlStock setNumAll(Integer numAll) {
		this.numAll = numAll;
		return this;
	}
	public Integer getNumFrozen() {
		return numFrozen;
	}
	public TwlStock setNumFrozen(Integer numFrozen) {
		this.numFrozen = numFrozen;
		return this;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public TwlStock setPrice(BigDecimal price) {
		this.price = price;
		return this;
	}
	public Long getStockInDetailId() {
		return stockInDetailId;
	}
	public TwlStock setStockInDetailId(Long stockInDetailId) {
		this.stockInDetailId = stockInDetailId;
		return this;
	}
	public String getStockInDay() {
		return stockInDay;
	}
	public TwlStock setStockInDay(String stockInDay) {
		this.stockInDay = stockInDay;
		return this;
	}
	public String getRemark() {
		return remark;
	}
	public TwlStock setRemark(String remark) {
		this.remark = remark;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public TwlStock setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public TwlStock setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public TwlStock setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static TwlStock twlStock(
		String companyVid,
		String orgid,
		String materialCode,
		Integer num,
		Integer numAll,
		Integer numFrozen,
		BigDecimal price,
		Long stockInDetailId,
		String stockInDay,
		String remark,
		Integer status
			) {
		TwlStock entity = new TwlStock();
		entity.setCompanyVid(companyVid);
		entity.setOrgid(orgid);
		entity.setMaterialCode(materialCode);
		entity.setNum(num);
		entity.setNumAll(numAll);
		entity.setNumFrozen(numFrozen);
		entity.setPrice(price);
		entity.setStockInDetailId(stockInDetailId);
		entity.setStockInDay(stockInDay);
		entity.setRemark(remark);
		entity.setStatus(status);
		return entity;
	}
}